<% if data['title'] %>
TITLE: <%= data['title'].join(', ') %>
<% end %>
<% if data['author'] %>
AUTHOR: <%= data['author'].join(', ') %>
<% end %>
<% if data['date'] %>
DATE: <%= DateTime.parse(data['date'].first).strftime("%m/%d/%Y %X") %>
<% end %>
<% if data['published'] %>
STATUS: <%= [0,'0',false,'f'].include?(data['published'].first) ? "draft" : "published" %>
<% end %>
<% data['category'] && data['category'].each do |cat| %>
CATEGORY: <%= cat %>
<% end %>
<% if data['tags'] %>
TAGS: "<%= data['tags'].first.split.join('","') %>"
<% end %>
-----
BODY:
<%= data['body'].join("\n") if data['body'] %>

-----
<% if data['extended_body'] %>
EXTENDED BODY:
<%= data['extended_body'] %>

-----
<% end %>
--------
